<?php


namespace App\Http\Controllers;


use App\Server\Constants;

class IndexController extends Controller
{
    public function city()
    {
        return $this->success(Constants::$city);
    }

    /**
     * 静态资源
     */
    public function resources()
    {
        $url = env('ALIYUN_DOMAIN') . '/static/';

        $location = default_location();

        $files = [
            'logo' => $url . 'logo_88px.png',  //logo
            'lat_default' => $location['lat'],
            'lng_default' => $location['lng'],
            'wechat_qrcode' => $url . 'wechat_gr.png',  //logo
            'addr_icon_1' => 'https://gz-fishing.oss-cn-heyuan.aliyuncs.com/static/addr_icon_1.png',//钓点地图定位图标
            'addr_icon_2' => 'https://gz-fishing.oss-cn-heyuan.aliyuncs.com/static/addr_icon_2.png', //钓点地图定位图标
            'wechat_group_backend' => 'https://gz-fishing.oss-cn-heyuan.aliyuncs.com/static/wechat_group_backend.gif',  //邀请函背景图
            'share_banner' => 'https://gz-fishing.oss-cn-heyuan.aliyuncs.com/static/WX20220522-200703%402x.png', //邀请函分享卡片封面图
            'bg_success' => $url . 'bg_90.png',  //天气，适宜钓鱼
            'bg_waring' => $url . 'bg_60.png',   //天气，一般
            'bg_danger' => $url . 'bg_20.png',   //天气，不适宜钓鱼
            'draw_bg_1' => $url . 'bg0.png',     //抽签背景1
            'draw_bg_2' => $url . 'bg1.png',     //抽签背景2
            'draw_bg_3' => $url . 'bg2.png',     //抽签背景3
            'draw_btn_1' => $url . 'btn0.png',     //抽签按钮1
            'draw_btn_2' => $url . 'btn1.png',     //抽签按钮2
            'draw_btn_3' => $url . 'btn2.png',     //抽签按钮3
            'draw_show_1' => $url . 'juanzhou.png',     //抽签卷轴
            'draw_show_2' => $url . 'k.png',         //抽签图片1
            'draw_show_3' => $url . 'light.png',     //抽签图片2
            'draw_qian_1' => $url . 'qian1.png',     //签1
            'draw_qian_2' => $url . 'qian2.png',     //签2
            'draw_qian_3' => $url . 'qian3.png',     //签3
            'draw_qiantong_1' => $url . 'qiantong.png',     //签筒1
            'draw_qiantong_2' => $url . 'tong.png',     //签筒2
            'draw_title' => $url . 'title.png',     //抽签标题
            'draw_wenzi' => $url . 'wenzi.png',     //抽签文字
            'draw_yaoyiyao' => $url . 'yaoyiyao.png',     //抽签摇一摇
            'draw_yuantuan' => 'https://gz-fishing.oss-cn-heyuan.aliyuncs.com/static/yuntuan.png',
            'draw_mp3_1' => 'https://gz-fishing.oss-cn-heyuan.aliyuncs.com/static/%E6%91%87%E5%8A%A8%E7%AD%BE%E9%9F%B3%E6%95%88.mp3',  //抽签音效1
            'draw_mp3_2' => 'https://gz-fishing.oss-cn-heyuan.aliyuncs.com/static/%E5%A4%A9%E7%81%AF%E7%A5%88%E7%A6%8Fbgm.mp3', //抽签音效2
        ];
        return $this->success($files);
    }
}